<?php

namespace App\Http\Model;

use Illuminate\Database\Eloquent\Model;

class Notes extends Model
{
    protected $table='notes';
    protected $primaryKey='nid';
    public $fillable=['uid','tittle','content'];

    public function rules()
    {
        return [
            'tittle'=>'required|max:15',
            'content'=>'required',
        ];

    }

    public function msg(){
        return [
            'tittle.required'=>'标题不能为空',
            'content.required'=>'内容不能为空',
            'tittle.max'=>'标题长度不得超过15',
        ];
    }
}
